<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
        BFC的作用：
        
        */
        p{
            width: 200px;
            height: 200px;
            background-color: khaki;
            margin: 50px;
        }


        /* 可以取消盒子margin的塌陷
        overflow: hidden;  可以创建BFC
        */
        .box{
            overflow: hidden;
        }



        .box1{
            height: 300px;
            width: 300px;
            background-color: aqua;
            float: left;
        }

        /* 阻止被浮动的元素覆盖，没有实用意义，但有理论意义 */
        .box2{
            height: 200px;
            width: 200px;
            background-color: blueviolet;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div class="box">
        <p></p>
    </div>

    <div class="box">
        <p></p>
    </div>


     <div class="box1">
    </div>
 <div class="box2">
    </div>


</body>
</html>